import time

from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop028"


firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品标签','商品标签分组')

firefox.find_element_by_xpath('//td[contains(text(),"华为老大")]/following-sibling::td[4]/a[2]').click()
firefox.switch_to.alert.accept()
time.sleep(5)

try:
    firefox.find_element_by_xpath('//td[text()="华为老大"')
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog('%s 测试成功'%testCase)

firefox.quit()